function [pathOU,pathBM]=correlatedou(a,m,y0,b,N)
%%%pg 267 of shrevebook
%m=1; alpha=0; y0=0; beta=1;
time=linspace(0,1/2,N);
dt=1/2/(N-1);
pathOU=zeros(size(time)); pathBM=zeros(size(time));
pathOU(1)=y0;
% hold on
% for pathnum=1:100
for ii=2:N
    rd=randn(1);
    pathOU(ii)=pathOU(ii-1)+a*(m-pathOU(ii-1))*dt+b*rd*sqrt(dt);
    pathBM(ii)=pathBM(ii-1)+rd*sqrt(dt);
end
% plot(time,path);
% end
